Ext.define('IAG.model.User', {
    extend: 'Ext.data.Model',
    idProperty: 'username',
    fields: ['username', 'lastname','firstname','md5Password'],
    proxy: {
        type: 'rest',
        api: {
        	create: '/agg/user',
            read: '/agg/users',
            update: '/agg/user',
            destroy: '/agg/user'
        },
        reader: {
            type: 'json',
            root: 'Users.User',
            successProperty: 'User'
        },
        writer: {
            type: 'json',
            root: 'User'
        }
    }
});
